<?php
namespace app\common\validate;
use think\Validate;

class Entry extends Validate
{
    protected $rule = [
        'name'  =>  'require|max:25',
        'linkman'  =>  'require|max:25',
        'phone'    =>  'require|max:25',
        'address'  =>  'require|max:50',
        'desc'  =>  'require',
        'pic'  =>  'require',
        'xieyi' => 'require'
    ];

    protected $message = [
        'name.require'  =>  '请填写企业名称',
        'linkman.require'  =>  '请填写联系人',
        'phone.require'  =>  '请填写联系电话',
        'address.require'  =>  '请填写地址',
        'desc.require'  =>  '请填写企业介绍',
        'pic.require'  =>  '请上传企业图片',
        'xieyi'  => '请同意经销商入驻协议'
    ];

    protected $scene = [
        'add'   =>  ['name','email'],
        'edit'  =>  ['email'],
    ];
}
